package com.hotel.controller;

import com.hotel.pojo.Rights;
import com.hotel.service.RightsService;
import com.hotel.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author by LuJinRong
 * @date 2021/7/25。
 * @time 18:11。
 */
@RestController
@RequestMapping("/rights")
@CrossOrigin
public class RightsController {

    @Autowired
    private RightsService rightsService;

    @GetMapping("getRightsList")
    public SysResult getRightsList(){
        System.out.println("11111111111111111111111111111111111111111");
        List<Rights> rightsList = rightsService.getRightsList();
        return SysResult.success(rightsList);
    }

}
